<template>
  <div>
  	<el-table
      :data="tableData"
      style="width: 100%">
      <el-table-column
        prop="title"
        label="节次"
        width="180">
        </el-table-column> 
      <el-table-column
        prop="t1"
        label="星期一"
        width="180">
      </el-table-column>
      <el-table-column
        prop="t2"
        label="星期二"
        width="180">
      </el-table-column>
      <el-table-column
        prop="t3"
        label="星期三">
      </el-table-column>
       <el-table-column
        prop="t4"
        label="星期四">
      </el-table-column>
       <el-table-column
        prop="t5"
        label="星期五">
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
  export default{
  	data(){
  		return{
  			  tableData: [{
            title: '第一节',
            t1: '0',
            t2: '0',
            t3:'0',
            t4:'0',
            t5:'0'
            
          }, {
             title: '第二节',
            t1: '0',
            t2: '0',
            t3:'0',
            t4:'0',
            t5:'0'
          }, {
             title: '第三节',
            t1: '0',
            t2: '0',
            t3:'0',
            t4:'0',
            t5:'0'
          }, {
             title: '第四节',
            t1: '0',
            t2: '0',
            t3:'0',
            t4:'0',
            t5:'0'
          }]
  			
  		}
  	},
  	created(){
  		this.csh();
  	},
  	methods:{
  		csh(){
  			
  			var sz=[{jc:'第一节',xq:'t3'},{jc:'第二节',xq:'t2'},{jc:'第四节',xq:'t5'}]
  			
  			for (var j=0;j<sz.length;j++){
  				
  				var jc=sz[j].jc
  			    var xq=sz[j].xq
  			
  			for (var i=0;i<this.tableData.length;i++){
  				if (this.tableData[i].title==jc){
  					this.tableData[i][xq]='1'
  					//console.log('找到了')
  				}
  			}
  				
  				
  			}
  			
  			
  			
  			
  		}
  	}
  }
</script>

<style scoped>
   


</style>